package com.example.my_music_palyer.service;

import com.example.my_music_palyer.mapper.UserMapper;
import com.example.my_music_palyer.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;
    public User login(User user){
        return userMapper.login(user);
    }

    public User selectByUserName(String username) {
        return userMapper.selectByUserName(username);
    }

    public int registerUser(User user){
        return userMapper.registerUser(user);
    }
}
